home *** CD-ROM | disk | FTP | other *** search
/ Family Forum 261 / SOMC Family Forum 261.iso / Xtras / Behavior Library.cst / 00020_Script_Sound Beep < prev    next >
Text File  |  1997-11-17  |  2KB  |  62 lines

  1. -- Sound System Beep
  2.  
  3. -- Media
  4. -- behavior library version 1.1
  5.  
  6. -- drag to a sprite 
  7. -- also functions through lingo by handling message 'initBeep', 
  8. -- for example if this behavior was assigned to sprite 5, use
  9. -- sendsprite 5, #initBeep
  10.  
  11. property whichEvent
  12.  
  13. on initBeep me
  14.   beep
  15. end
  16.  
  17. on mouseUp me
  18.   if the whichevent of me = #mouseUp    then beep
  19. end
  20.  
  21. on mouseDown me
  22.   if the whichevent of me = #mouseDown  then beep
  23. end
  24.  
  25. on mouseWithin me
  26.   if the whichevent of me = #mouseWithin  then beep
  27. end
  28.  
  29. on prepareFrame me
  30.   if the whichevent of me = #prepareFrame then beep
  31. end
  32.  
  33. on mouseEnter me
  34.   if the whichevent of me = #mouseEnter then beep
  35. end
  36.  
  37. on mouseLeave me
  38.   if the whichevent of me = #mouseLeave then beep
  39. end
  40.  
  41. on enterFrame me
  42.   if the whichevent of me = #enterFrame then beep
  43. end
  44.  
  45. on exitFrame me
  46.   if the whichevent of me = #exitFrame  then beep
  47. end
  48.  
  49. ---
  50.  
  51. on getPropertyDescriptionList
  52.   
  53.   set p_list = [     #WhichEvent: [ #comment:   "Initializing Event:",                     #format:   #symbol,                      #range: [ #mouseUp, #mouseDown, #mouseWithin, #mouseEnter, #mouseLeave,                                #prepareFrame, #enterFrame, #exitFrame, #initBeep ],                    #default:   #MouseUp ]                  ]
  54.   return p_list  
  55.   
  56. end
  57.  
  58. on getBehaviorDescription
  59.   return "Plays the system beep sound when the specified event occurs." & RETURN & "ò Initializing Event - Specify the event that triggers the behavior."
  60. end
  61.  
  62.